from pathlib import Path
import pickle
from models.wargs import WorkerArguments
from feasytools import ArgChecker
from utils.data_loader import Dataset_Traffic

if __name__ == "__main__":
    opt = WorkerArguments(ArgChecker())
    dst = Dataset_Traffic(opt.path, opt, "val")
    p = Path(f"./ckpts/{opt.data}/")
    p.mkdir(parents=True, exist_ok=True)
    with open(str(p / "scaler.pkl"), "wb") as f:
        pickle.dump(dst.scaler, f)
